package indi.kider.server.woniubus.service;


import indi.kider.common.model.apartment.DevLock;
import indi.kider.common.model.apartment.RentLock;
import indi.kider.common.model.employee.Employee;
import indi.kider.server.apartment.model.DevLockOpenDoorLogVo;
import pers.vankid.common.model.base.CoreException;
import pers.vankid.common.utils.page.PageRequest;
import pers.vankid.common.utils.page.PageResponse;

import java.util.List;
import java.util.Map;

/**
 *  锁接口
 */
public interface DevLockService {
    /**
     * 开门列表接口
     * @param request
     * @param employee
     * @return
     */
    PageResponse<List<Map>> getOpenDoorLogList(PageRequest<DevLockOpenDoorLogVo> request, Employee employee);

    /**
     * 开门统计记录查询（分页）
     * @param request
     * @param employee
     * @return
     */
    PageResponse<List<Map>> getOpenDoorSumLogList(PageRequest<DevLockOpenDoorLogVo> request, Employee employee);

    /**
     * 新增锁具锁
     *
     * @param devLock
     * @return
     */
    DevLock addDevLock(DevLock devLock) throws CoreException;
    /**
     * 根据锁具ID查询锁具信息。
     *
     * @param id
     * @return
     */
    DevLock lockByID(Long id)throws CoreException;
    /**
     * 根据锁具HouseId查询锁具信息。
     *
     * @param houseId
     * @return
     */
    DevLock lockByHouseId(Long houseId)throws CoreException;

    /**
     * 修改锁具
     * @param devLock
     * @return
     * @throws CoreException
     */
    int updateDevLock(DevLock devLock)throws CoreException;
    /**
     * 根据房源查询锁具列表
     * @param rentLock
     * @return
     */
    List<RentLock> getRentLock(RentLock rentLock) ;

    /**
     * 解除绑定锁具
     * @param lockId
     * @param housesId
     */
    void cleanHouseLock( Long lockId,Long housesId) throws Exception;
}
